﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BookExchange.ODataService;

namespace BookExchange.ViewModel
{
    public class CommentViewModel
    {
        public CommentViewModel()
        {
        }

        public CommentViewModel(Comment comment)
        {
            this.MemberCode = comment.MemberCode;
            this.MemberName = string.Empty;
            this.CommentCode = comment.CommentCode;
            this.Description = comment.Description;
            this.CreatedTime = comment.CreatingDate.HasValue ? comment.CreatingDate.Value : new DateTime();
        }

        public int MemberCode { get; set; }
        public string MemberName { get; set; }

        public int CommentCode { get; set; }
        public string Description { get; set; }
        public DateTime CreatedTime { get; set; }
    }
}
